package calendar;

import task.Task;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

/**
 * Date: 27.10.11
 * Time: 22:17
 *
 * @author pavel
 */
public abstract class ATime {

    protected List< Task > taskList;

    protected Calendar calendar;

    public ATime(Calendar calendar) {
        this.calendar = calendar;
        this.taskList = new ArrayList<Task>();
    }

    public List< Task > getTaskList() {
        return taskList;
    }

    public void addTask(Task task) {
        taskList.add(task);
    }

    @Override
    public String toString() {
        String result = "";
        for(int i = 0; i < taskList.size(); i++) {
            result += (i + 1) + ") " + taskList.get(i).toString() + "\n";
        }
        return result;
    }
}
